package com.example.site.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 房间类型
 * @TableName hotel_type
 */
@TableName(value ="hotel_type")
@Data
public class Type implements Serializable {
    /**
     * 
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 名称
     */
    @TableField(value = "name")
    private String name;

    /**
     * 价格
     */
    @TableField(value = "price")
    private Integer price;

    /**
     * 图片
     */
    @TableField(value = "photo")
    private String photo;

    /**
     * 最多容纳人数
     */
    @TableField(value = "people")
    private String people;

    /**
     * 床位数量
     */
    @TableField(value = "bed_count")
    private String bedCount;

    /**
     * 床的大小
     */
    @TableField(value = "bed_size")
    private String bedSize;

    /**
     * 设备
     */
    @TableField(value = "equipment")
    private String equipment;

    /**
     * 备用品
     */
    @TableField(value = "spares")
    private String spares;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Type other = (Type) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice()))
            && (this.getPhoto() == null ? other.getPhoto() == null : this.getPhoto().equals(other.getPhoto()))
            && (this.getPeople() == null ? other.getPeople() == null : this.getPeople().equals(other.getPeople()))
            && (this.getBedCount() == null ? other.getBedCount() == null : this.getBedCount().equals(other.getBedCount()))
            && (this.getBedSize() == null ? other.getBedSize() == null : this.getBedSize().equals(other.getBedSize()))
            && (this.getEquipment() == null ? other.getEquipment() == null : this.getEquipment().equals(other.getEquipment()))
            && (this.getSpares() == null ? other.getSpares() == null : this.getSpares().equals(other.getSpares()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode());
        result = prime * result + ((getPhoto() == null) ? 0 : getPhoto().hashCode());
        result = prime * result + ((getPeople() == null) ? 0 : getPeople().hashCode());
        result = prime * result + ((getBedCount() == null) ? 0 : getBedCount().hashCode());
        result = prime * result + ((getBedSize() == null) ? 0 : getBedSize().hashCode());
        result = prime * result + ((getEquipment() == null) ? 0 : getEquipment().hashCode());
        result = prime * result + ((getSpares() == null) ? 0 : getSpares().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", name=").append(name);
        sb.append(", price=").append(price);
        sb.append(", photo=").append(photo);
        sb.append(", people=").append(people);
        sb.append(", bedCount=").append(bedCount);
        sb.append(", bedSize=").append(bedSize);
        sb.append(", equipment=").append(equipment);
        sb.append(", spares=").append(spares);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}